<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>总客服-h5版本</title>
    <link rel="stylesheet" href="${base}/layui/css/layui.css">
    <link rel="stylesheet" href="${base}/awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="${base}/css/admin.css">
    <link rel="stylesheet" href="${base}/layui/css/layim.css">
    <style>
    	.layui-bg-black{width: 200px;height: 136px;margin-right: 30px;float: left;text-align: center;font-size: 33px;color: #000000!important;padding-top: 30px;}
    	.hide {display: none;}
    	.checkbox{display: inline-block;}
    	.layui-form-item{font-size: 18px;}
    	.width100 {width: 100px;}
    	.discuss{ float: left;margin-left: 30px;padding-top: 6px;}
    	.discuss p{text-align: left; font-size: 13px;margin-top: 5px;padding-top: 2px;}
    	.discuss_img{ float: left;margin-left: 10px;margin-top: 5px;}
     	.img {vertical-align: top;} 
    </style>
</head>
<body  class="layui-layout-body" style="overflow:scroll;">
<div class="layui-main" style="position: absolute;left: 5px;top: 20px; width: calc(100% - 10px);" >
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 10px;">
  <legend>总客服-所有水号聊天回复</legend>
</fieldset>
<div class="layui-layer layui-layer-page layui-box layui-layim-chat" id="layui-layer2" contype="string" style="z-index: 19891016; width: 100%; top: 140px; left:0px; min-width: 300px; min-height: 420px; ">
<div class="layim-chat-box" >
	<div class="layim-chat layim-chat-friend layui-show">
		<div class="layui-unselect layim-chat-title">
			<div class="layim-chat-other">
				<a href="${base}/users_list/detail?user_id=${receive.id}" target="_blank" ><img class="layim-friend100001" src="http://qiniu.static.50dufei.top/${receive.userHeader?default('')}?imageView2/1/w/100/h/100"  title="我"/></a>
				<span class="layim-chat-username" layim-event=""><script>document.write(decodeURIComponent("${receive.nickName}"));</script>  ${receive.userMobile?default('')}</span>
				<p class="layim-chat-status">user_id:${receive.id}   </p>
			</div>
		</div>
	<div class="layim-chat-main" style="height: 262px;">
		<ul>
		<#list list as m>
			<li>
				<div class="layim-chat-user"><a href="${base}/users_list/detail?user_id=${send.id}" target="_blank" ><img src="http://qiniu.static.50dufei.top/${send.userHeader?default('')}?imageView2/1/w/100/h/100"></a><cite><script>document.write(decodeURIComponent("${send.nickName}"));</script><i>${m.create_time_string}</i></cite></div>
				<div class="layim-chat-text">${m.content}</div>
			</li>
		</#list>
		</ul>
	</div>
	<div class="layim-chat-footer">
		<div class="layim-chat-textarea">
			<textarea id="content" name="content" placeholder="说点什么"></textarea>
		</div>
		<div class="layim-chat-bottom">
			<div class="layim-chat-send">
				<span class="layim-send-btn" id="remove" >删除好友</span>
				<span class="layim-send-btn" id="close" >关闭</span>
				<span class="layim-send-btn" id="send" >发送</span>
			</div>
		</div>
	</div>
</div>
</div>
</div>
</body>
<script src="${base}/js/jquery-2.1.4.min.js" type="text/javascript"></script>
<script src="${base}/js/jquery.form.js"></script>
<script src="${base}/layui/layui.all.js"></script>
<script type="text/javascript">
$("#content").focus();


$("#remove").click(function (){
	$.post("${base}/chat/remove",
	   		{"id":${one.id}},function(data){ 
	   			layer.alert(data);
	   			window.location.reload();
	   		}
	 );	
});
$("#send").click(function (){
	var content = $("#content").val();
	$.post("${base}/chat/reply",
	   		{"id":${one.id},"content":content},function(data){ 
	   			layer.alert(data);
	   			window.location.reload();
	   		}
	 );	
});

$("#close").click(function (){
	$.post("${base}/chat/pass",
	   		{"id":${one.id}},function(data){ 
	   			layer.alert(data);
	   			window.location.reload();
	   		}
	 );			
});

</script>
</html>